package com.ticket.system.service;

import java.math.BigDecimal;
import java.util.List;

import com.ticket.system.domain.YanchuConsumeRecord;
import com.ticket.system.domain.YanchuMovieCard;
import com.ticket.system.domain.YanchuOrder;
import com.ticket.system.domain.YanchuRefundOrder;
import com.ticket.system.domain.vo.CardVo;

import javax.servlet.http.HttpServletResponse;

/**
 * 观演卡数据Service接口
 * 
 * @author ruoyi
 * @date 2023-12-12
 */
public interface IYanchuMovieCardService 
{
    /**
     * 查询观演卡数据
     * 
     * @param id 观演卡数据主键
     * @return 观演卡数据
     */
    public YanchuMovieCard selectYanchuMovieCardById(Long id);

    /**
     * 查询观演卡数据列表
     * 
     * @param yanchuMovieCard 观演卡数据
     * @return 观演卡数据集合
     */
    public List<YanchuMovieCard> selectYanchuMovieCardList(YanchuMovieCard yanchuMovieCard);

    /**
     * 新增观演卡数据
     * 
     * @param yanchuMovieCard 观演卡数据
     * @return 结果
     */
    public int insertYanchuMovieCard(YanchuMovieCard yanchuMovieCard);

    /**
     * 修改观演卡数据
     * 
     * @param yanchuMovieCard 观演卡数据
     * @return 结果
     */
    public int updateYanchuMovieCard(YanchuMovieCard yanchuMovieCard);

    /**
     * 批量删除观演卡数据
     * 
     * @param ids 需要删除的观演卡数据主键集合
     * @return 结果
     */
    public int deleteYanchuMovieCardByIds(Long[] ids);

    /**
     * 删除观演卡数据信息
     * 
     * @param id 观演卡数据主键
     * @return 结果
     */
    public int deleteYanchuMovieCardById(Long id);

    /**
     * 添加观演卡消费记录
     * @param yanchuOrder
     * @param cardVo
     * @return
     */
    public int consume(YanchuOrder yanchuOrder, CardVo cardVo);
    /**
     * 退观演卡
     * @param record
     * @return
     */
    public int refundByRecord(YanchuConsumeRecord record, BigDecimal cardAmt);

    /**
     * 部分退
     * @param refundOrder
     * @param yanchuOrder
     * @return
     */
    public int refund(YanchuRefundOrder refundOrder, YanchuOrder yanchuOrder, BigDecimal cardAmt);
    /**
     * pc获取卡列表
     *
     * @param batchId
     * @param amount
     * @param cardNum
     * @param keyName
     * @return
     */
    List<YanchuMovieCard> selectYanchuMovieCardByList(Long batchId,String cardNum,String amount,String keyName,Integer status);

    /**
     * 导出观演卡
     *
     * @param carIds
     * @param response
     */
    void export(List<Long> carIds, HttpServletResponse response);

    /**
     * 小程序登录用户绑定观演卡
     *
     * @param cardNum
     * @param cardPasswoed
     * @param userName
     * @param userId
     * @param phonenumber
     */
    int bindMovie(String cardNum, String cardPasswoed, String userName, Long userId, String phonenumber);

    /**
     * 小程序返回用户观演卡数据
     *
     * @param userId
     * @param type
     * @return
     */
    List<YanchuMovieCard> mobileCardList(Long userId,Integer type);
}
